package com.aisile.model.base.vos;

import lombok.Data;
import lombok.experimental.Accessors;

/**
 * @Auther:yry
 * @Date:2024/6/11 0011
 * @VERSON:1.0
 */
@Data
@Accessors(chain = true) // 开启链式编程
public class R {

    private String msg;

    private Object data;

    private Integer code;

    public R(String msg, Object data, Integer code) {
        this.msg = msg;
        this.data = data;
        this.code = code;
    }


    public R() {
    }

    public static R ok(){
        return new R("ok",null,20000);
    }
    public static R ok(Object data){
        return new R("ok",data,20000);
    }
    public static R fail(){
        return new R("no",null,30000);
    }
    public static R fail(String msg){
        return new R(msg,null,30000);
    }
}
